package com.yuhs.zixing.study.design.pattern.dp002.create.c001.singleton;

/**
 * @description 懒汉式
 * @author: yuhs
 * @date 2022/3/30 下午3:12
 */
public class SingletonDemo003 {
    private SingletonDemo003() {
    }

    private static SingletonDemo003 instance;

    public static SingletonDemo003 getInstance() {
        if (instance == null) {
            instance = new SingletonDemo003();
        }
        return instance;
    }

}
